package Prototype;

public class PrototypePatternDemo {

    public static void main(String[] args) {

        ShapeCache.loadCache();  // 里面创建了三个shape的对象,并且加入到了 shapeMap 里去了

        Shape one = (Shape) ShapeCache.getShape("1");
        System.out.println("Shape: " + one.getType());

        Shape two = (Shape) ShapeCache.getShape("2");
        System.out.println("Shape: " + two.getType());

        Shape three = (Shape) ShapeCache.getShape("3");
        System.out.println("Shape: " + three.getType());

    }
}
